# coding=utf-8
import logging
from gevent import monkey
import sys

from app import create_app
# monkey.patch_all()
application = create_app(flask_config = 'development')

logging.basicConfig(filename='/usr/local/applogs/ws-agent.log', filemode='w',
                    level=logging.DEBUG,
                    format="%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s"
                    )

reload(sys)
sys.setdefaultencoding('utf8')
if __name__ == "__main__":
    application.run(host = '0.0.0.0', port = 5005, debug = False)
